package com.wgt.observer.java_impl;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by wgt on 2017/6/18.
 */
public class WGTObserver implements Observer {

    String name ="我是吴功涛！";

    @Override
    public void update(Observable o, Object arg) {
        if (arg != null) {
            System.out.println(this.name + "获取到的对象属性是：{" + o.toString() + "},已经内容是：" + arg.toString());
        } else {
            System.out.println(this.name + "获取到的对象属性是：{" + o.toString() + "}");
        }
    }
}
